LEVEL = ../../..

TESTS = $(wildcard *.c)

NAME = bzip2
CCFLAG = -DNDEBUG -DSPEC_CPU -I.

include $(LEVEL)/Makefile.common

raw.out: $(TESTS:.c=.llvm.bc)
	llvm-link *.llvm.bc -o out.o.linked
	llc out.o.linked
	gcc out.o.linked.s -o $(NAME).raw.out -lm

debug.out: $(TESTS:.c=.debug.bc)
	llvm-link *.llvm.bc -o out.o.linked
	llc out.o.linked
	gcc out.o.linked.s -o $(NAME).debug.out -lm

test.out: $(TESTS:.c=.test.bc)
	llvm-link *.llvm.bc -o out.o.linked
	llc out.o.linked
	gcc out.o.linked.s -o $(NAME).test.out -lm

